import { AxiosPromise } from "axios";
import { pointInfo,pointquery } from "./type";
import service from "@/utils/request";
const { systemService } = service;

/**
 *
 * @param queryParams 获取积分列表
 * @returns
 */
export function getPoint(): AxiosPromise<any> {
  return systemService({
    url: "/system/normalArgs/getLits",
    method: "get",
  });
}

/**
 * 对应的积分删除
 */

export function deleteInfo(id: number): AxiosPromise<any> {
  return systemService({
    url: "/system/normalArgs/delete/" + id,
    method: "delete",
  });
}

/**
 * 添加
 */

export function addInfo(data: pointquery): AxiosPromise<any> {
  return systemService({
    url: "/system/normalArgs/save",
    method: "post",
    data: data,
  });
}

/**
 * 编辑
 */

export function editInfo(data: pointInfo): AxiosPromise<any> {
  return systemService({
    url: "/system/normalArgs/update",
    method: "patch",
    data: data,
  });
}
